package terra.model;

public class Slot
{
	//int[] slots = {Slot.NECKLACE,Slot.HELMET,Slot.RING,Slot.LHAND,Slot.BODY,Slot.RHAND,Slot.GLOVES,Slot.LEGS,Slot.BOOTS};

	public final static int NECKLACE =	0;
	public final static int HELMET = 	1;
	public final static int RING = 		2;
	public final static int LHAND = 	3;
	public final static int BODY = 		4;
	public final static int RHAND = 	5;
	public final static int GLOVES = 	6;
	public final static int LEGS = 		7;
	public final static int BOOTS = 	8;

	public static int SLOT_COUNT = 9;
	
	public static int getSlotByName(String name)
	{
		if (name.equalsIgnoreCase("necklace"))
			return 0;
		if (name.equalsIgnoreCase("helmet"))
			return 1;
		if (name.equalsIgnoreCase("ring"))
			return 2;
		if (name.equalsIgnoreCase("lhand"))
			return 3;
		if (name.equalsIgnoreCase("body"))
			return 4;
		if (name.equalsIgnoreCase("rhand"))
			return 5;
		if (name.equalsIgnoreCase("gloves"))
			return 6;
		if (name.equalsIgnoreCase("legs"))
			return 7;
		if (name.equalsIgnoreCase("boots"))
			return 8;
		return -1;
	}
	
	public static String getImageBySlotId(int id)
	{
		if (id == 0)
			return "necklace0";
		if (id == 1)
			return "helmet0";
		if (id == 2)
			return "ring0";
		if (id == 3)
			return "lhand0";
		if (id == 4)
			return "body0";
		if (id == 5)
			return "rhand0";
		if (id == 6)
			return "gloves0";
		if (id == 7)
			return "legs0";
		if (id == 8)
			return "boots0";
		return "helmet0";
	}

	public static String getNameBySlotId(int slot)
	{
		if (slot == 0)
			return "necklace";
		if (slot == 1)
			return "helmet";
		if (slot == 2)
			return "ring";
		if (slot == 3)
			return "lhand";
		if (slot == 4)
			return "body";
		if (slot == 5)
			return "rhand";
		if (slot == 6)
			return "gloves";
		if (slot == 7)
			return "legs";
		if (slot == 8)
			return "boots";
		
		return "null";
	}
	
}
